package com.chiaching.pms.controller;

import com.chiaching.common.api.CmsSubjectApi;
import com.chiaching.common.domain.pojo.CmsSubject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author jiajing.he
 * @date 2021/4/3 11:02
 */
@RestController
@RequestMapping("api")
public class ApiController {

    @Autowired
    CmsSubjectApi cmsSubjectApi;

    @GetMapping("/cmsSubject/all")
    public List<CmsSubject> cmsSubjects(){
        return cmsSubjectApi.allCmsSubject();
    }

    @GetMapping("getServerInfo")
    public String getServerInfo(){
        return cmsSubjectApi.getServerInfo();
    }
}
